using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Planisoft.Entities;


namespace Planisoft.DAO.Mapping
{
    public class UbigeoDistritoMap : EntityTypeConfiguration<UbigeoDistrito>
    {
        public UbigeoDistritoMap()
        {
            // Primary Key
            this.HasKey(t => t.IdUbiDtto);

            // Properties
            this.Property(t => t.CodPdtUbiDtto)
                .IsFixedLength()
                .HasMaxLength(18);

            // Table & Column Mappings
            this.ToTable("UbigeoDistrito");
            this.Property(t => t.IdUbiDtto).HasColumnName("IdUbiDtto");
            this.Property(t => t.CodPdtUbiDtto).HasColumnName("CodPdtUbiDtto");
            this.Property(t => t.DescUbiDtto).HasColumnName("DescUbiDtto");
        }
    }
}
